package com.bgds.sys.api.service.impl;

import com.bgds.sys.config.socket.BusConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.stereotype.Component;

/**
 * @author Smiling
 * @description: TODO
 * @date 2021/4/22  23:14
 */
@Slf4j
@Component
//@RabbitListener(
//        bindings = @QueueBinding(
//                value = @Queue(value = BusConfig.QUEUE, durable = "true"),
//                exchange = @Exchange(value = BusConfig.EXCHANGE, type = "topic", durable = "true", ignoreDeclarationExceptions = "true"),
//                key = "boot.*"
//        )
//)
public class ConsumerService {

//    @RabbitHandler
    public void readMessage(@Payload String msg){
        log.info("收到的消息:{}",msg);
    }
}